-- GENERATED SPELL FOR [Thistle Bear] --


function spell0_2163(pUnit, Event) --@Claw,n/a--
pUnit:FullCastSpellOnTarget(16828,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2163', 627, 1)
end

function spell1_2163(pUnit, Event) --@Cower,n/a--
pUnit:FullCastSpellOnTarget(1742,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2163', 0, 1)
end

function spell2_2163(pUnit, Event) --@Growl,n/a--
pUnit:FullCastSpellOnTarget(14916,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2163', 0, 1)
end

function spell3_2163(pUnit, Event) --@Ravage,n/a--
pUnit:FullCastSpellOnTarget(3242,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2163', 2276, 1)
end

function spell4_2163(pUnit, Event) --@Swipe,n/a--
pUnit:FullCastSpellOnTarget(50256,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2163', 0, 1)
end

function Sorts_2163(pUnit, Event)
local choix_sorts_2163 = math.random(0, 4)
if choix_sorts_2163 == 0 then
pUnit:RegisterEvent('spell0_2163', 1, 1)
end
if choix_sorts_2163 == 1 then
pUnit:RegisterEvent('spell1_2163', 1, 1)
end
if choix_sorts_2163 == 2 then
pUnit:RegisterEvent('spell2_2163', 1, 1)
end
if choix_sorts_2163 == 3 then
pUnit:RegisterEvent('spell3_2163', 1, 1)
end
if choix_sorts_2163 == 4 then
pUnit:RegisterEvent('spell4_2163', 1, 1)
end
end

function mob2163_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2163', math.random(1500, 3000), 1)
end

function mob2163_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2163_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2163_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2163, 1, 'mob2163_Action')
RegisterUnitEvent(2163, 2, 'mob2163_Leave')
RegisterUnitEvent(2163, 3, 'mob2163_Kill')
RegisterUnitEvent(2163, 4, 'mob2163_Die')
